package com.jeesite.modules.dataScreen.utils;

import cn.hutool.core.util.NumberUtil;

import java.math.BigDecimal;
import java.math.BigInteger;

public class MyNumberUtil {

    private static final long W = 10000;
    private static final long Y = 100000000;

    public static String abbreviate(long number) {
        if (number >= Y) {
            return NumberUtil.decimalFormat("0.00", (double) number / Y) + "亿";
        } else if (number >= W) {
            return NumberUtil.decimalFormat("0.00", (double) number / W) + "万";
        }
        return String.valueOf(number);
    }
}
